1. /* siomuldb.cpp by K.Tsuru */
  2. // function ID = 445 BRADIX
  3. /***********************************
  4. SInteger class
  5. m*n including the case int,long, etc.
  6. It converts "n" to an integer.
  7. ************************************/
  8. #ifndef SN_H
  9. #include "sn.h"
  10. #endif
  11. SInteger operator*(const SInteger& m, double n){
  12. if(n == 1.0) return m;
  13. if(n == -1.0) return -m;
  14. if(n == 0.0) return SLong(m.Type(), minArraySize);
  15. SInteger r;
  16. if(fabs(n) <= (double)m.SlOpMaxValue() ){
  17. ulong p = (ulong)fabs(n);
  18. IsMult(m, p, r);
  19. if(n < 0) r.ChangeSign();
  20. } else {
  21. r = n;
  22. r = LLMult(m, r);
  23. }
  24. return r;
  25. }

siomuldb.cpp : last modifiled at 2015/12/14 16:19:34(621 bytes)
created at 2016/04/25 14:53:17
The creation time of this html file is 2017/10/25 11:09:45 (Wed Oct 25 11:09:45 2017).